import random

all_choices = ['石头', '剪刀', '布']
computer = random.choice(all_choices)
wins = [['石头','剪刀'], ['剪刀','布'], ['布','石头']]
player = int(input('''请出拳：
0 石头
1 剪刀
2 布
'''))

print('你出的是：%s, 电脑出的是：%s' % (all_choices[player], computer))
if all_choices[player] == computer:
    print('平局')
elif [all_choices[player], computer] in wins:
    print('你赢')
else:
    print('你输')